Skip to content

fix(vue): emit tab change events after the tab switches without a router outlet - #31831

Open
thetaPC wants to merge 1 commit into
mainfrom
FW-8013
Open

thetaPC wants to merge 1 commit into
mainfrom
FW-8013

Conversation

@thetaPC

@thetaPC thetaPC commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Issue number: internal


What is the current behavior?

In Vue, when IonTabs has IonTab children instead of an IonRouterOutlet, the tab bar emits ionTabsWillChange and ionTabsDidChange itself as soon as a tab button is clicked, before core ion-tabs switches tabs:

  • ionTabsDidChange fires while the old tab is still active, and on load it fires before any tab is active.
  • Calling select() on ion-tabs switches tabs without firing either event.
  • After a select() call, clicking back to the previous tab fires nothing either, because the tab bar's record of the active tab is out of date.

What is the new behavior?

  • Without a router outlet, IonTabs forwards the events from core ion-tabs, which emits them once the tab has switched, including for the first tab on load and for select().
  • The tab bar only emits the events when there is a router outlet. Tabs with a router outlet are unchanged.
  • The tabs test page without a router outlet (/tabs-basic) has a button that calls select() and shows which tab is active when ionTabsDidChange fires. The new e2e tests use them.

Does this introduce a breaking change?

  • Yes
  • No

Other information

N/A

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Nov 26, 2026 12:11am UTC

Request Review

@github-actions github-actions Bot added the package: vue @ionic/vue package label Nov 26, 2026
@thetaPC
thetaPC marked this pull request as ready for review November 26, 2026 00:23
@thetaPC
thetaPC requested a review from a team as a code owner November 26, 2026 00:23

This branch was successfully deployed

1 active deployment
Preview — cc43cc1d Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant